import request from "@/api/request";
import { apiClusterJava } from "@/api/root";

// 创建简历
export const createResumePdf = (data) => {
  return request.webservice(
    "cr",
    `${apiClusterJava}/api-career/open/index`,
    "/personResumeAttachment/createResumePdf",
    data
  );
};
// 创建简历,新的
export const createResumeAttachment = (data) => {
  return request.webservice(
    "cr",
    `${apiClusterJava}/api-career/open/index`,
    "/personResumeAttachment/createResumeAttachment",
    data
  );
};

// 获取简历
export const getPersonResumeAttachment = (data) => {
  return request.webservice(
    "cr",
    `${apiClusterJava}/api-career/open/index`,
    "/personResumeAttachment/getPersonResumeAttachment",
    data
  );
};
// 获取简历,新的
export const getResumeTemplate = (data) => {
  return request.webservice(
    "cr",
    `${apiClusterJava}/api-career/open/index`,
    "/personResumeTemplate/getResumeTemplate",
    data
  );
};
// 获取附件简历列表
export const selectAll = (data) => {
  return request.webservice(
    "cr",
    `${apiClusterJava}/api-career/open/index`,
    "/personResumeAttachment/getPersonResumeAttachmentList",
    data
  );
};
// 修改简历名称
export const update = (data) => {
  return request.webservice(
    "cr",
    `${apiClusterJava}/api-career/open/index`,
    "/personResumeAttachment/update",
    data
  );
};
// 删除简历
export const remove = (data) => {
  return request.webservice(
    "cr",
    `${apiClusterJava}/api-career/open/index`,
    "/personResumeAttachment/remove",
    data
  );
};
// 获取简历模块排序
export const getModuleSort = (data) => {
  return request.webservice(
    "cr",
    `${apiClusterJava}/api-career/open/index`,
    "/personResumeCustom/getModuleSort",
    data
  );
};
// 修改简历模块排序
export const updateModuleSort = (data) => {
  return request.webservice(
    "cr",
    `${apiClusterJava}/api-career/open/index`,
    "/personResumeCustom/updateModuleSort",
    data
  );
};
// 保存简历，发送邮箱
export const personSaveAttachment = (data) => {
  return request.webservice(
    "cr",
    `${apiClusterJava}/api-career/open/index`,
    "/personResumeAttachment/personSaveAttachment",
    data
  );
};
// 上传简历
export const personAddAttachment = (data) => {
  return request.webservice(
    "cr",
    `${apiClusterJava}/api-career/open/index`,
    "/personResumeAttachment/personAddAttachment",
    data
  );
};

// 附件简历设置优先展示接口
export const setAttachmentResumeFirstShow = (data) => {
  return request.webservice( 
    "cr",
    `${apiClusterJava}/api-career/open/index`, 
    "/personResumeAttachment/priorShowAttachment",
    data
  );
};